<?php
class ORMpz_client extends ORMBase {
  public function __construct() {
    parent::__construct('pz_client');
  }

  public function __toEpObject($myManager, $epObject, $object) {
    if (isset($object->track_id)) {
      $epObject->track_id =  $object->track_id;
    }
    if (isset($object->name_family)) {
      $epObject->name_family =  $object->name_family;
    }
    if (isset($object->name_first)) {
      $epObject->name_first =  $object->name_first;
    }
    if (isset($object->file_folder_num)) {
      $epObject->file_folder_num =  $object->file_folder_num;
    }
    if (isset($object->date_birth)) {
      $epObject->date_birth =  $object->date_birth;
    }
    if (isset($object->nationality)) {
      $epObject->nationality =  $object->nationality;
    }
    if (isset($object->gender)) {
      $epObject->gender =  $object->gender;
    }
    if (isset($object->partnership_status)) {
      $epObject->partnership_status =  $object->partnership_status;
    }
    if (isset($object->addr1)) {
      $epObject->addr1 =  $object->addr1;
    }
    if (isset($object->addr2)) {
      $epObject->addr2 =  $object->addr2;
    }
    if (isset($object->addr3)) {
      $epObject->addr3 =  $object->addr3;
    }
    if (isset($object->phone1)) {
      $epObject->phone1 =  $object->phone1;
    }
    if (isset($object->phone2)) {
      $epObject->phone2 =  $object->phone2;
    }
    if (isset($object->phone3)) {
      $epObject->phone3 =  $object->phone3;
    }
    if (isset($object->email)) {
      $epObject->email =  $object->email;
    }
    if (isset($object->pass_num)) {
      $epObject->pass_num =  $object->pass_num;
    }
    if (isset($object->pass_date_exp)) {
      $epObject->pass_date_exp =  $object->pass_date_exp;
    }
    if (isset($object->pass_date_issue)) {
      $epObject->pass_date_issue =  $object->pass_date_issue;
    }
    if (isset($object->country_birth)) {
      $epObject->country_birth =  $object->country_birth;
    }
    if (isset($object->agent)) {
      $epObject->agent =  $object->agent;
    }
    if (isset($object->staff)) {
      $epObject->staff =  $object->staff;
    }
    if (isset($object->first_contact_date)) {
      $epObject->first_contact_date =  $object->first_contact_date;
    }
    if (isset($object->first_contact_detail)) {
      $epObject->first_contact_detail =  $object->first_contact_detail;
    }
    if (isset($object->latest_visa_id)) {
      $epObject->latest_visa_id =  $object->latest_visa_id;
    }
    return $epObject;
  }

  public function __toObject($myManager, $epObject, $object) {
    $object->id = $epObject->oid;
    $object->track_id = $epObject->track_id;
    $object->name_family = $epObject->name_family;
    $object->name_first = $epObject->name_first;
    $object->file_folder_num = $epObject->file_folder_num;
    $object->date_birth = $epObject->date_birth;
    $object->nationality = $epObject->nationality;
    $object->gender = $epObject->gender;
    $object->partnership_status = $epObject->partnership_status;
    $object->addr1 = $epObject->addr1;
    $object->addr2 = $epObject->addr2;
    $object->addr3 = $epObject->addr3;
    $object->phone1 = $epObject->phone1;
    $object->phone2 = $epObject->phone2;
    $object->phone3 = $epObject->phone3;
    $object->email = $epObject->email;
    $object->pass_num = $epObject->pass_num;
    $object->pass_date_exp = $epObject->pass_date_exp;
    $object->pass_date_issue = $epObject->pass_date_issue;
    $object->country_birth = $epObject->country_birth;
    $object->agent = $epObject->agent;
    $object->staff = $epObject->staff;
    $object->first_contact_date = $epObject->first_contact_date;
    $object->first_contact_detail = $epObject->first_contact_detail;
    $object->latest_visa_id = $epObject->latest_visa_id;
    return $object;
  }
}
?>
